package com.xjc.infra.entity.service;

import java.io.Serializable;


public class XGenericReponseDTO implements Serializable {

	private static final long serialVersionUID = 2660369248749853532L;

	private TransactionStatus transactionStatus;
	
	public XGenericReponseDTO() {
		this.transactionStatus = new TransactionStatus();
	}
	
	public XGenericReponseDTO(String errorCode, String replyText) {
		getTransactionStatus().setErrorCode(errorCode);
        getTransactionStatus().setReplyText(replyText);
	}
	 
	public TransactionStatus getTransactionStatus() {
		if (null == transactionStatus) {
            this.transactionStatus = new TransactionStatus();
        }
        return transactionStatus;
    }

	public void setTransactionStatus(TransactionStatus transactionStatus) {
		this.transactionStatus = transactionStatus;
	}
	
	public XGenericReponseDTO setErrMsg(String errorCode, String replyText) {
		this.transactionStatus.setErrorCode(errorCode);
        this.transactionStatus.setReplyText(replyText);
        return this;
    }

	    
}
